<template>
  <el-container style="height: 100vh; ">
    <el-menu router unique-opened :default-active="$route.path">
      <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
        <el-row justify="center" class="row-bg">
          <el-col :span="24" style="background-color: #409eff">
            <el-tag id="manageList" effect="dark">
              <i class="el-icon-menu"></i>&nbsp;&nbsp;管理列表
            </el-tag>
          </el-col>
        </el-row>

        <!-- 分类 -->
        <el-submenu index="1">
          <template slot="title">
            <i class="el-icon-share"></i>分类管理
          </template>
          <el-menu-item-group>
            <el-menu-item index="/categories/list">分类列表</el-menu-item>
            <el-menu-item index="/categories/create">新建分类</el-menu-item>
          </el-menu-item-group>
        </el-submenu>

        <!-- 装备 -->
        <el-submenu index="2">
          <template slot="title">
            <i class="el-icon-s-help"></i>装备管理
          </template>
          <el-menu-item-group>
            <el-menu-item index="/items/list">装备列表</el-menu-item>
            <el-menu-item index="/items/create">新建装备</el-menu-item>
          </el-menu-item-group>
        </el-submenu>

        <!-- 英雄 -->
        <el-submenu index="3">
          <template slot="title">
            <i class="el-icon-star-off"></i>英雄管理
          </template>
          <el-menu-item-group>
            <el-menu-item index="/heroes/list">英雄列表</el-menu-item>
            <el-menu-item index="/heroes/create">新建英雄</el-menu-item>
          </el-menu-item-group>
        </el-submenu>

        <!-- 文章管理 -->
        <el-submenu index="4">
          <template slot="title">
            <i class="el-icon-edit-outline"></i>文章管理
          </template>
          <el-menu-item-group>
            <el-menu-item index="/articles/list">文章列表</el-menu-item>
            <el-menu-item index="/articles/create">新建文章</el-menu-item>
          </el-menu-item-group>
        </el-submenu>

        <!-- 广告管理 -->
        <el-submenu index="5">
          <template slot="title">
            <i class="el-icon-data-line"></i>广告管理
          </template>
          <el-menu-item-group>
            <el-menu-item index="/ads/list">广告列表</el-menu-item>
            <el-menu-item index="/ads/create">新建广告</el-menu-item>
          </el-menu-item-group>
        </el-submenu>

        <!-- 管理人员 -->
        <el-submenu index="6">
          <template slot="title">
            <i class="el-icon-user"></i>人员管理
          </template>
          <el-menu-item-group>
            <el-menu-item index="/admin_users/list">管理员列表</el-menu-item>
            <el-menu-item index="/admin_users/create">新建管理员</el-menu-item>
          </el-menu-item-group>
        </el-submenu>
      </el-aside>
    </el-menu>

    <el-container>
      <el-header style="text-align: right; ">
        <el-dropdown>
          <i class="el-icon-setting" style="margin-right: 5px;font-size: 17px;">
            <span style="cursor:pointer; font-size: 16px;margin-right: 15px">设置</span>
          </i>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item>
              <span @click=" $router.push('/login')">退出登陆</span>
            </el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
        <span>奔跑的面条</span>
      </el-header>

      <el-main :class="{bodybg: this.$route.meta.isbg }">
        <router-view class="pa" :key="$route.path"></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    userOut() {
      alert("2323");
      sessionStorage.token = "";
      this.$router.push("/login");
    }
  }
};
</script>
<style>
body {
  margin: 0px;
}
.bodybg {
  background: url(../assets/bg-2.jpg) no-repeat;
  overflow: hidden;
  margin-top: -60px;
}
.el-main {
  z-index: 1;
  overflow: hidden;
}

.pa {
  background-color: #ffffff;
  padding: 20px;
}
#manageList {
  height: 60px;
  padding-left: 20px;
  line-height: 60px;
  font-size: 16px;
  width: 100%;
  font-weight: 200;
}
.el-header {
  background-color: #b3c0d1;
  color: #333;
  line-height: 60px;
}
.el-card__header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.5) !important;
}
.el-aside {
  color: #333;
}
</style>

<script>
export default {};
</script>